package com.haiya.factory.absfactory.farm.factory;

import com.haiya.factory.absfactory.farm.product.Animal;
import com.haiya.factory.absfactory.farm.product.Cattle;
import com.haiya.factory.absfactory.farm.product.Plant;
import com.haiya.factory.absfactory.farm.product.Vegetable;

public class ZhFarm implements Farm {
    @Override
    public Animal newAnimal() {
        System.out.println("一头牛出生~~~~~~");
        Cattle cattle = new Cattle();
        cattle.setOwner("智慧农场");
        return cattle;
    }

    @Override
    public Plant newPlant() {
        System.out.println("种了一片蔬菜~~~~~~~~");
        Vegetable vegetable = new Vegetable();
        vegetable.setOwner("智慧农场");
        return vegetable;
    }
}